package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"goods-guru/api/internal/config"
	"goods-guru/goodrpc/goodrpcclient"
)

type ServiceContext struct {
	Config  config.Config
	GoodRpc goodrpcclient.Goodrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		GoodRpc: goodrpcclient.NewGoodrpc(zrpc.MustNewClient(c.GoodRpc)),
	}
}
